import json

with open('numbers.json', 'w') as f:
    numbers = [2, 3, 5, 7, 11, 13]
    content = json.dumps(numbers)
    f.write(content)

with open('numbers.json', 'r') as f:
    read = f.read()
    numbers = json.loads(read)
    # 好处：加载出来的结果是一个列表对象，可以直接遍历
    print(type(numbers))
    print(numbers)
